package com.raymond.queue.common.msg.request;

import com.raymond.queue.common.enums.CommandIdType;
import com.raymond.queue.common.msg.DefaultMessage;

/**
 * 消费消息请求
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2021-07-17 15:32
 */
public class ConsumptionMsgRequest extends DefaultMessage {
    public ConsumptionMsgRequest(int sequenceId) {
        super(sequenceId);
    }

    public ConsumptionMsgRequest(int sequenceId, String topic, String groupName) {
        super(sequenceId);
        this.topic = topic;
        this.groupName = groupName;
    }

    public ConsumptionMsgRequest(int sequenceId, String topic, String groupName, int count) {
        super(sequenceId);
        this.topic = topic;
        this.groupName = groupName;
        this.count = count;
    }

    private String topic;

    private String groupName;

    private int count;

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public int getCommandId() {
        return CommandIdType.CONSUMPTION_REQ.getCommandId();
    }
}
